Node-RED block in Snap4City Microservice library node-red-contrib-snap4city-developer is "full-text-search-within-wkt-area">

It allows to retrieve the geolocated entities (not only services) that match with a list of keywords. The results can be possibly filtered to be within a specified distance from a GPS position, or within a rectangular area or inside a WKT geolocated area.

Inputs

A JSON with these parameters:
wktarea string
"<WKT_string>” a described as Well Known Text (info about WKT Area)
search string
the keywords separated with spaces that have to match with any textual description associated with an entity.g
maxresults number
maximum number of results to be returned (if parameter is missing 100 is assumed), if it is 0 all results are returned
lang string
ISO 2 chars language code (e.g. “it”, “en”, “fr”, “de”, “es”) to be used for returned descriptions if available in multiple languages. Currently for languages other than “it” and “en” it returns “en” descriptions. (if parameter is missing “en” is assumed)
geometry boolean
true/false, if true it returns a “hasGeometry” property for each service stating if the service has a complex WKT geometries (linestring, polygon) associated with it (if parameter is missing “false” is assumed)

Outputs

  1. ServiceUri Array
    Returns an array containing the servicesUri of each service found
  2. GeoJSON Results
    the results format is a GeoJSON “FeatureCollection” with the matching entities, additionally the “fullCount” property provides the full count of results available matching the query. For each “Feature” a minimal set of properties are provided

Details

The node can receive a JSON with the parameters described in the Inputs section and with them generate the output JSON. If the values are not present in the input JSON, these are read by those in the configuration. If they are not present in either part, an error is generated for the necessary parameters.